define([],function () {
    var tpl = {};
    tpl.babyInfoInit = function(){
        var html = '';
        html += babyInfo();
        return html;
    };
    tpl.searchConInit = function(){
        var html = '';
        html += searchCon();
        return html;
    };
    tpl.dialogInit = function(){
        var html = '';
        html += dialog();
        return html;
    };
    tpl.authorityInit = function(){
        var html = '';
        html += authority();
        return html;
    };
    var babyInfo = function(){
        return '<script id="babyInfo-tpl" type="text/html">'+
                    '<div class="basic-info">'+
                        '<div class="title">' +
                        '{{if gender == "F"}}'+
                            '<img src="page/followup/imgs/comm/girl.png" />' +
                        '{{else}}'+
                             '<img src="page/followup/imgs/comm/boy.png" />' +
                        '{{/if}}'+
                        '</div>'+
                        '<div>'+
                            '<div>{{userName}}</div>'+
                            '<div>{{phoneNo}}</div>'+
                        '</div>'+
                    '</div>'+
                    '<div>'+
                        '<lable>出生日期：</lable>'+
                        '<font>{{birthday}}</font>'+
                    '</div>'+
                    '<div>'+
                        '<lable>分娩：</lable>'+
                        '<font>{{if pregnancyStatus}}{{pregnancyStatus}}{{else}}-{{/if}}</font>'+
                    '</div>'+
                    '<div >'+
                        '<lable>末次月经时间：</lable>'+
                        '<font>{{if lmp}}{{lmp}}{{else}}-{{/if}}</font>'+
                    '</div>'+
                    '<div >'+
                        '<lable>保健册号：</lable>'+
                        '<font>{{if bookNo}}{{bookNo}}{{else}}-{{/if}}</font>'+
                    '</div>'+
                 '</script>';
    };
    var searchCon = function(){
        return '<script id="searchCon-tpl" type="text/html">'+
            '<div class="pull-left sports-title">显示记录</div>'+
            '<div class="pull-right text-right">'+
                '<button class="btn btn-info" id ="lastMonth" >最近一个月</button> '+
                '<button class="btn btn-default" id ="self_defined" >自定义</button>'+
                '<span>'+
                '<input type="date" class = "form-control" id="fromTime"/> '+
                '-'+
                ' <input type="date" class = "form-control" id="endTime"/>'+
                '</span>'+
            '</div>'+
            '</script>';
    };
    /*
     * 弹窗模板
     * */
    var dialog = function(){
        return '<script type = "text/html" id="dialog-tpl">'+
                '<div class="modal fade" tabindex="-1" role="dialog" id="myModal">'+
                    '<div class="modal-dialog" role="document">'+
                        '<div class="modal-content">'+
                            '<div class="modal-header">'+
                                '<h4 class="modal-title">{{title}}</h4>'+
                            '</div>'+
                            '<div class="clearfix modal-body text-center">{{tips}}</div>'+
                            '<div class="modal-footer text-center">'+
                                '<button type="button" class="btn btn-info" flag = "1">{{btn1}}</button>'+
                                '<button type="button" class="btn btn-info" data-dismiss="modal" flag = "0">{{btn0}}</button>'+
                            '</div>'+
                        '</div>'+
                    '</div>'+
                '</div>'+
                '</script>'
    };
    //授权弹窗：
    var authority = function(){
        return '<script type = "text/html" id="authority-tpl">'+
                '<div class="modal fade" tabindex="-1" role="dialog" id="myAuthority">'+
                    '<div class="modal-dialog" role="document">'+
                        '<div class="modal-content">'+
                            '<div class="modal-body">' +
                                '<div style="color:red;text-align:center;">*扫码后，请使用  小米登录 。切勿使用华米登录或微信登录。</div>'+
                                '<div id="erweima_authority" class="erweima"></div>'+
                                '<div id="tipsAdd" class="text-center">授权成功后，请下载 &nbsp;<span class="status">小米运动</span> &nbsp;app，并使用授权小米账号登录。<br/><span class="status">小米运动</span> &nbsp;将会辅助您的运动血糖管理。</div>'+
                            '</div>'+
                        '</div>'+
                    '</div>'+
                '</div>'+
                '</script>'
    };
    return tpl;
});